package com.ddwl.schema.bo.goods;


import com.ddwl.schema.bo.base.BaseBo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.Instant;
import java.util.List;


/**
 * 团购
 *
 * @author Fu Zhaohui
 */
@ApiModel(description = "团购Bo")
@Setter
@Getter
public class GroupBuyBo extends BaseBo {

    @ApiModelProperty("主键")
    private String id;
    @NotNull(message = "请输入所属商户")
    @ApiModelProperty("商户ID")
    private String mchId;
    @ApiModelProperty("活动主题")
    private String title;
    @ApiModelProperty("活动介绍")
    private String desc;
    @NotNull(message = "活动起始时间为空")
    @ApiModelProperty("活动起始时间")
    private Instant gmtBegin;
    @NotNull(message = "活动截止时间为空")
    @ApiModelProperty("活动截止时间")
    private Instant gmtEnd;
    @NotNull(message = "使用起始时间为空")
    @ApiModelProperty("使用起始时间")
    private Instant gmtUseBegin;
    @NotNull(message = "使用截止时间为空")
    @ApiModelProperty("使用截止时间")
    private Instant gmtUseEnd;
    @NotNull(message = "开团人数")
    @ApiModelProperty("人数")
    private Integer personQty;
    @ApiModelProperty("启用状态")
    private Byte status;
    @ApiModelProperty("是否需要支付")
    private Boolean needPay;
    @NotNull(message = "团购价为空")
    @ApiModelProperty("团购价")
    private BigDecimal price;
    @NotNull(message = "拼团可选项为空")
    @Size(min = 1, message = "拼团可选项为空")
    @ApiModelProperty("商品列表")
    private List<GroupBuyItemBo> items;
    @ApiModelProperty("分佣类型 0为固定值 1为比例")
    private Byte rebateType;
    @ApiModelProperty("一级分佣")
    private BigDecimal rebate1;
    @ApiModelProperty("二级分佣")
    private BigDecimal rebate2;
    @ApiModelProperty("三级分佣")
    private BigDecimal rebate3;
}
